1. Field of the Invention
The preferred embodiment relates generally to data processing systems and, more specifically, to a computer-implemented method, apparatus, and computer program product for managing DMA write page faults using a pool of substitute write buffer pages.
2. Description of the Related Art
According to a trend in computer systems, a system can be reconfigured while running without disrupting data processing. For example, with multiple operating systems running on the computer, while a first one of the operating systems is using a particular block of memory there can arise a need to reallocate the block of memory for use by a second one of the operating systems. In this case, the first operating system must first stop using the block of physical memory before the memory can be reallocated. Or, for example, a problem may be detected in a block of physical memory, in which case it may be desirable to remove the memory from operation so that it can be replaced. Once again, whatever operating system was using the block of memory must stop using it.
In certain respects it is relatively straightforward to stop using one block of physical memory and start using another, since mechanisms related to virtual memory management already exist in conventional operating systems to handle aspects of this problem that relate to operating system access to this memory. But these mechanisms depend upon the block of memory being used for only program data that is subject to access by operating systems and that is not subject to access by I/O devices. If the block of memory is subject to access by I/O devices the problem is more difficult. This access by I/O devices is commonly direct memory access (DMA), although this may not always be the case.
Blocks of memory subject to access by an I/O device, through the I/O device's I/O adapter, are conventionally “pinned,” that is, exempted from being moved because access to them is restricted by essentially endless I/O programs that run as long as the operating system runs. It is disruptive to the system to stop such an I/O program that pins memory. By pinning these blocks of memory, the blocks of memory are essentially dedicated for use by the I/O device that has pinned the memory. One or more individual blocks of memory can be reserved, by being pinned, for use by a particular individual I/O device.
Pinning blocks of memory, however, is not particularly efficient for the computer system that includes the I/O device that has pinned memory for its use. These blocks of memory are typically underutilized. Although an I/O device may at some point need to use its pinned memory by writing to that memory, the memory often sits unused.